package org.ailoli.aixiang.constants

object SystemConstants {
    const val CONFIG_FILE = "AIXIANG_SHARD_FILE"

    // 电池控制板VID和PID
    const val DEVICE_V_ID = "1155"
    const val DEVICE_P_ID = "22336"

    // B8功能码返回数据总长度 （5 + 18 + 1）= 24位
    const val DATA_B8_RT_TOTALLENGTH = 24

    // 数据帧头
    const val DATA_HEADER_1 = "55"
    const val DATA_HEADER_1_BYTE = "85"
    const val DATA_HEADER_1_POSITION = 0
    const val DATA_HEADER_2 = "55"
    const val DATA_HEADER_2_BYTE = "85"
    const val DATA_HEADER_2_POSITION = 1
    // 数据帧尾 （异或校验）
    // 未连接默认字节
    const val DATA_NORMAL_HEX = "FF"
    // 数据头
    const val DATA_HEADER_SIZE = 5
    // 数据位
    const val DATA_BATTERY_STATE_POSITION = 1
    const val DATA_TEMP_STATE_POSITION = 2
    const val DATA_SOC_POSITION = 3
    const val DATA_CHARGE_STATE_POSITION = 4
    const val DATA_SINGLE_MAX_VOLTAGE_HIGH_BYTE = 5
    const val DATA_SINGLE_MAX_VOLTAGE_LOW_BYTE = 6
    const val DATA_SINGLE_LOW_VOLTAGE_HIGH_BYTE = 7
    const val DATA_SINGLE_LOW_VOLTAGE_LOW_BYTE = 8
    const val DATA_SINGLE_HIGH_VOLTAGE_POSITION = 9
    const val DATA_SINGLE_LOW_VOLTAGE_POSITION = 10
    const val DATA_MAX_TEMP = 11
    const val DATA_MIN_TEMP = 12
    const val DATA_TOTAL_VOLTAGE_HIGH_BYTE = 13
    const val DATA_TOTAL_VOLTAGE_LOW_BYTE = 14
    const val DATA_TOTAL_ELECTRIC_HIGH_BYTE = 15
    const val DATA_TOTAL_ELECTRIC_LOW_BYTE = 16
    const val DATA_REMAINING_TIME_HIGH_BYTE = 17
    const val DATA_REMAINING_TIME_LOW_BYTE = 18


}